package com.hctrl.mybatis.interceptor.handler;

import java.time.LocalDate;

/**
 * @author hanchao
 * @version 1.0
 * @date 2022/5/29 1:01
 */
public class LocalDateTypeHandler implements TypeHandler<LocalDate> {

    @Override
    public Boolean isSupport(Class<?> type) {
        return type.equals(LocalDate.class);
    }

    @Override
    public String handler(LocalDate localDate) {
        String s = localDate.toString();
        return new StringBuilder().append("'").append(s).append("'").toString();
    }
}
